package com.nuo.admin.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuo.admin.base.entity.SysUser;
import com.nuo.admin.pojo.dto.AuthUserDTO;
import com.nuo.admin.pojo.query.UserPageQuery;
import com.nuo.admin.pojo.vo.user.UserFormVO;
import com.nuo.admin.pojo.vo.user.UserPageVO;
import com.nuo.common.mybatis.annotation.DataPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LGC
 * @description 针对表【sys_user(用户信息表)】的数据库操作Mapper
 * @createDate 2022-02-09 11:35:10
 * @Entity com.nuo.admin.base.entity.SysUser
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 获取用户分页列表
     *
     * @param pageParam
     * @param queryParams
     * @return
     */
    @DataPermission(deptAlias = "d")
    List<UserPageVO> listUsersWithPage(Page<UserPageVO> pageParam, @Param("queryParams") UserPageQuery queryParams);

    /**
     * 根据用户ID获取用户详情
     *
     * @param userId
     * @return
     */
    UserFormVO getUserFormDetail(@Param("userId")Long userId);

    /**
     * 根据用户名获取认证信息
     *
     * @param username
     * @return
     */
    AuthUserDTO getAuthInfoByUsername(@Param("username")String username);
}




